package com.burstly.lib.component.networkcomponent.burstly;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.FrameLayout;
import android.widget.FrameLayout.LayoutParams;

final class ImageFullscreen
  implements BurstlyFullscreenActivity.IFullscreenView
{
  static final Integer IMPLEMENTATION_ID = Integer.valueOf(0);
  static boolean sIsShowing;
  Activity mActivity;
  private Runnable mCloseRunnable;
  private Handler mHandler;
  private int mShowtime;

  private void autoClose(Integer paramInteger)
  {
    this.mHandler = new Handler();
    this.mCloseRunnable = new Runnable()
    {
      public void run()
      {
        ImageFullscreen.this.mActivity.finish();
      }
    };
    this.mHandler.postDelayed(this.mCloseRunnable, 1000 * paramInteger.intValue());
  }

  public ViewGroup.LayoutParams getAttachParameters()
  {
    return null;
  }

  public View onCreate(Bundle paramBundle, Activity paramActivity)
  {
    this.mActivity = paramActivity;
    BurstlyImageAdaptor localBurstlyImageAdaptor = BurstlyImageAdaptor.sImageAdaptor;
    if ((localBurstlyImageAdaptor == null) || (localBurstlyImageAdaptor.mInterstitialView == null))
      return null;
    View localView = localBurstlyImageAdaptor.mInterstitialView;
    BurstlyImageAdaptor.sImageAdaptor = null;
    localBurstlyImageAdaptor.mInterstitialView = null;
    FrameLayout localFrameLayout = new FrameLayout(this.mActivity);
    localFrameLayout.addView(localView, new FrameLayout.LayoutParams(-2, -2, 17));
    this.mShowtime = this.mActivity.getIntent().getIntExtra("interstitialShowtime", 15);
    autoClose(Integer.valueOf(this.mShowtime));
    return localFrameLayout;
  }

  public void onDestroy(Activity paramActivity)
  {
    if (this.mHandler != null)
      this.mHandler.removeCallbacks(this.mCloseRunnable);
    this.mHandler = null;
    this.mCloseRunnable = null;
    sIsShowing = false;
  }

  public boolean onKey(Activity paramActivity, int paramInt, KeyEvent paramKeyEvent)
  {
    return false;
  }

  public void onPause(Activity paramActivity)
  {
    this.mHandler.removeCallbacks(this.mCloseRunnable);
  }

  public void onResume(Activity paramActivity)
  {
    autoClose(Integer.valueOf(this.mShowtime));
  }

  public boolean onTouchEvent(Activity paramActivity, MotionEvent paramMotionEvent)
  {
    return false;
  }

  public boolean showDefaultCloseButton()
  {
    return true;
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.burstly.lib.component.networkcomponent.burstly.ImageFullscreen
 * JD-Core Version:    0.6.2
 */